package com.xinqi.modules.course.course.enums.clazz;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

@Describe("班级审核状态")
public enum ClassAuditStatusEnum implements BaseEnum {

    /**
     * 未申请
     */

    NOT_ACCEPT("NOT_ACCEPT", "未申请"),
    /**
     * 待审核
     */
    UNAUDITED("UNAUDITED", "待审核"),

    /**
     * 通过
     */
    PASS("PASS", "通过"),

    /**
     * 拒绝
     */
    REJECT("REJECT", "拒绝");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    ClassAuditStatusEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static ClassAuditStatusEnum of(String code) {
        return BaseEnum.of(ClassAuditStatusEnum.class, code);
    }

}
